package com.queclink.ycm.proto;

import com.queclink.ycm.handler.CommonHandler;
import com.queclink.ycm.model.ChannelSession;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.AttributeKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;

/**
 * @author jim.li
 * @email jim.li@queclink.com
 * @date 2022-01-10 09:37:00
 */
public class ProtocolTpUtility {

    private static final Logger log = LoggerFactory.getLogger(ProtocolTpUtility.class);
    private static CommonHandler commonHandler;

    public static void distributed(ChannelHandlerContext ctx, String msg, AttributeKey<ChannelSession> attributeKey, HashMap map) {
        //Attribute<ChannelSession> attribute = ctx.channel().attr(attributeKey);
        // ChannelSession state = attribute.get();

        //解析出设备
//        commonHandler = new DeviceProtoCoreHandler(msg, ctx, map);
//        // commonHandler.handler(ctx,msg,attribute);
//        if (commonHandler != null) {
//            WorkerThread.exceute(commonHandler);
//        }
    }
}
